const path = require('path')

module.exports = {
  publicPath: '/static/',
  lintOnSave: false,
  devServer: {
    overlay: {
      warnings: true,
      errors: true
    },
    proxy: {
      '/api': {
        target: 'http://114.116.250.121:8888',
        ws: true,
        secure: false,  // 是否https
        changeOrigin: true,  // 是否跨域
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  },
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.join(__dirname, './src'),
        '@views': path.join(__dirname, './src/views'),
        '@images': path.join(__dirname, './src/assets/images'),
        '@scss': path.join(__dirname, './src/assets/scss'),
        '@packages': path.join(__dirname, './src/components/packages'),
        '@pack': path.join(__dirname, './src/components/src')
      }
    }
  }
}
